
<!DOCTYPE html>
<html>
<head>
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>

<link rel="stylesheet" type="text/css" href="theme/layui/css/layui.css">
<link rel="stylesheet" type="text/css" href="theme/default/css/common.css">
<script src="theme/default/Js/Common.js"></script>
<script src="theme/default/Js/jquery-3.0.0.min.js"></script>
<script src="theme/default/js/artDialog.js?skin=blue"></script>
<link rel="stylesheet" type="text/css" href="include/webupload/webuploader.css">
<script src="include/webupload/webuploader.min.js"></script> 
<script src="include/webupload/uploads.js"></script>
<link rel='stylesheet' type="text/css" href='theme/desktop/css/font-awesome.min.css'>

</head>
<body>

<!----------------------------------------采购产品开始----------------------------------------> 
<!----------------------------------------采购产品开始----------------------------------------> 
<script>
<!-- 必填项提示
function CheckInput()
{
	if(document.all.goodsname.value == ""){art.dialog({title: 'Error',time: 1,icon: 'warning',content: '商品名称不能为空'});document.all.goodsname.focus();return false;}
	if(document.all.goodsgys.value == ""){art.dialog({title: 'Error',time: 1,icon: 'warning',content: '供应商不能为空'});document.all.goodsgys.focus();return false;}
	if(document.all.payway.value == ""){art.dialog({title: 'Error',time: 1,icon: 'warning',content: '支付方式不能为空'});document.all.payway.focus();return false;}
	if(document.all.jingbanren.value == ""){art.dialog({title: 'Error',time: 1,icon: 'warning',content: '经办人不能为空'});document.all.jingbanren.focus();return false;}
}
-->
</script>
<div class="cssout">
  <form class="layui-form" name="save" action="?stype=saveadd&LaiLu=" method="post" onSubmit="return CheckInput();">
    <div class="cssin">
      <ul>
        <li class="w100 bg">
          <dd class="isin"><B>新增产品采购</B></dd>
        </li>
        <li class="w25 bg cl tr">
          <dd class="isin">
            <font color="#FF0000">*</font>
          产品名称</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="goodsid" type="hidden" id="goodsid" size="10" value="" readonly />
            <input name="goodsname" type="text" id="goodsname" size="30" value="" readonly onclick='choose_cp("goodssave.asp?action=choose&stype=cp&otype=order&LaiLu=")' />
            <input name="Back" type="button" id="Back" class="btnxuanz" value="..." title="请选择" onclick='choose_cp("goodssave.asp?action=choose&stype=cp&otype=order&LaiLu=")'>
            <script>function choose_cp(Dourl) {$.dialog.open(Dourl, {title: '选择采购商品', width: 1000, height: 500,fixed: true}); };</script></dd>
        </li>
        
        <li class="w25 bg cl tr">
          <dd class="isin"> 规格</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="pguige" type="text" id="pguige" size="20" value="" readonly />
        </li>
        
        <li class="w25 bg cl tr">
          <dd class="isin"> 型号</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="pxinghao" type="text" id="pxinghao" size="20" value="" readonly />
        </li>
        
        <li class="w25 bg cl tr">
          <dd class="isin"> 现有库存</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="pkucunnow" type="text" id="pkucunnow" size="20" value="" readonly />
          </dd>
        </li>
        <li class="w25 bg cl tr">
          <dd class="isin">
            
            新采购数量</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="goodsnum" type="text" id="goodsnum" size="10" onChange="oMoney.value=goodsdanjia.value*parseInt(goodsnum.value)-goodszhekou.value" value="1" onFocus="if (value =='1'){value ='1'}" onblur="if (value ==''){value='1'}" />
          </dd>
        </li>
        
        <li class="w25 bg cl tr">
          <dd class="isin"> 存放仓库</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="ckid" type="hidden" id="ckid" size="20" value="" readonly />
            <input name="goodsck" type="text" id="goodsck" size="30" value="" readonly onclick='choose_ck("goods_ck.asp?action=cklist&stype=cklist&choose=1&LaiLu=")' />
            <input name="Back" type="button" id="Back" class="btnxuanz" value="..." title="请选择" onclick='choose_ck("goods_ck.asp?action=cklist&stype=cklist&choose=1&LaiLu=")'>
            <script>function choose_ck(Dourl) {$.dialog.open(Dourl, {title: '选择仓库', width: 1000, height: 500,fixed: true}); };</script> 
          </dd>
        </li>
        
        <li class="w25 bg cl tr">
          <dd class="isin"><font color="#FF0000">*</font> 供应商</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="gysid" type="hidden" id="gysid" size="20" value="" readonly />
            <input name="goodsgys" type="text" id="goodsgys" size="30" value="" readonly onclick='choose_gys("goods_gys.asp?action=gyslist&stype=gyslist&choose=1&LaiLu=")' />
            <input name="Back" type="button" id="Back" class="btnxuanz" value="..." title="请选择" onclick='choose_gys("goods_gys.asp?action=gyslist&stype=gyslist&choose=1&LaiLu=")'>
            <script>function choose_gys(Dourl) {$.dialog.open(Dourl, {title: '选择供应商', width: 1000, height: 500,fixed: true}); };</script> 
          </dd>
        </li>
        <li class="w25 bg cl tr">
          <dd class="isin"> 成本单价</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="goodsdanjia" type="text" id="goodsdanjia" onchange="oMoney.value=goodsdanjia.value*parseInt(goodsnum.value)-goodszhekou.value" size="20" value="" />
          </dd>
        </li>
        <li class="w25 bg cl tr">
          <dd class="isin">
            
            总折扣</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="goodszhekou" type="text" id="goodszhekou" size="20" onchange="oMoney.value=goodsdanjia.value*parseInt(goodsnum.value)-goodszhekou.value" value="0" onfocus="if (value =='0'){value =''}" onblur="if (value ==''){value='0'}" />
            元</dd>
        </li>
        <li class="w25 bg cl tr">
          <dd class="isin"> 商品总金额</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="oMoney" type="text" id="oMoney" size="20" style="font-weight:bold;color:Red;" class="" value="0" onFocus="if (value =='0'){value =''}"onblur="if (value ==''){value='0'}" readonly />
            元</dd>
        </li>
        
        
<li class="w25 bg cl tr">
          <dd class="isin">
            总运费</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="goodsyunfei" type="text" id="goodsyunfei" size="20" value="0" onfocus="if (value =='0'){value =''}" onblur="if (value ==''){value='0'}" />
            元</dd>
        </li>
        
        <li class="w25 bg cl tr">
          <dd class="isin"><font color="#FF0000">*</font> 支付方式</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <select name="payway" id="payway">
              <option value="">请选择</option>
              <option value="现金付款">现金付款</option>
              <option value="银行转账">银行转账</option>
              <option value="支付宝">支付宝</option>
              <option value="支票">支票</option>
              <option value="其它">其它</option>
            </select>
          </dd>
        </li>
        <li class="w25 bg cl tr">
          <dd class="isin"><font color="#FF0000">*</font> 经办人</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="jingbanren" type="text" id="jingbanren" size="20" value=""  onClick='addReceive("Receiver.asp?action=Receiver&stype=Receiver&LaiLu=")' style="cursor:pointer;"/>
          </dd>
        </li>
        <script>function addReceive(Dourl) {$.dialog.open(Dourl, {title: '快速选择', width: 600, height: 450,fixed: true}); };</script>
        <li class="w25 bg cl tr">
          <dd class="isin"> 采购日期</dd>
        </li>
        <li class="w75">
          <dd class="isin">
            <input name="caigoudate" type="text" id="caigoudate" size="20" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" value="2017/12/20" />
          </dd>
        </li>
        <li class="w25 bg cl duohang tr">
          <dd class="isin">
            订单产品备注</dd>
        </li>
        <li class="w75 duohang">
          <dd class="isin">
            <textarea name="beizhu" rows="4" id="beizhu" class="bor int" style="height:65px;width:98%;"></textarea>
          </dd></li>
          <div class="clear"></div>
      </ul>
    </div>
    <div class="h50b"></div>
    <div class="fixed_bg_B">
      <input name="goodsuser" type="hidden" value="超级管理员">
      <input type="submit" name="Submit" class="btn2 btnbaoc" value="保存">
      <input name="Back" type="button" id="Back" class="btn2 btnguanb" value="关闭" onClick="art.dialog.close();guanbi();">
    </div>
  </form>
</div>

<script src="theme/default/WdatePicker.js"></script> 
<script src="theme/layui/layui.js"></script> 
<script src="theme/desktop/js/common.js"></script>

<script>
/*弹出窗口封装代码*/
$(".open-app").on("click",function(){
	var width = $(this).data("width")?$(this).data("width"):900,//获得宽度
	height = $(this).data("height")?$(this).data("height"):400//获得高度
	url = $(this).attr("href")//获得打开URL
	title = $(this).attr("title");//获得标题	
	$.dialog.open(url, {title: title, width:width,height:height, fixed: true});
	return false;	
})
</script>

</body>
</html>
